<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta
			content="width=device-width, initial-scale=1.0"
			name="viewport" />
		<title>Browser</title>
		<style>
			body {
				margin: 0;
			}

			iframe {
				width: 100%;
				height: 90vh;
				border: none;
			}
		</style>
	</head>
	<body>
		<button onClick="refresh()">refresh</button>
		<iframe
			id="iframe"
			allowfullscreen
			loading="lazy"
			name="iframe"
			src="https://bilibili.com"
			title="embedded browser">
		</iframe>
	</body>
	<script>
		function refresh() {
			// 获取 iframe 元素
			var iframe = document.getElementById('iframe');
			iframe.src = 'https://baidu.com';
		}
	</script>
</html>
